import { createRouter, createWebHistory } from 'vue-router'
const routes = [
    {
        path: '/',
        name: 'index',
        component: () => import('@/views/index.vue'),
        children: [
            {
                path: '/form',
                name: 'form',
                component: () => import('@/views/form.vue')
            },
            {
                path: '/table',
                name: 'table',
                component: () => import('@/views/table.vue')
            },
            {
                path: '/page',
                name: 'page',
                component: () => import('@/views/page.vue')
            }
        ]
    }
]
const router = createRouter({
    history: createWebHistory('/'), // hash模式：createWebHashHistory，history模式：createWebHistory
    routes
})
export default router